Goal:

Questions:

What does it mean to be correlated?

Background

Experiment

I created a simulation study to observe the co-evolutionary outcome of the newt-snake interaction with different genetic architectures (GAs) in a spatial setting. I hypothesized that we would see an interaction (co-evolutionary arms race) between newt and snake phenotype under some GA combinations when newts and snakes were evolving over geographical space. Each GA is paired with another GA creating 16 combinations.

Experiment values:

The data

many of the experiments did not run to completion (i will run this part 3 times)

## All cor, lit, and grid files exist!
## This program will now end!
## All cor, lit, and grid files exist!
## This program will now end!
## All cor, lit, and grid files exist!
## This program will now end!
## All cor, lit, and grid files exist!
## This program will now end!

Mean Phenotype Whole Simulation

Phenotype differences (v_a)

Table of average Differences (v_a)

##                      Group.1            x
## 1    1e-08_0.005_1e-08_0.005  0.124241445
## 2   1e-08_0.005_1e-09_0.0158 -0.073054703
## 3     1e-08_0.005_1e-10_0.05 -0.028004664
## 4    1e-08_0.005_1e-11_0.158 -0.156932495
## 5   1e-09_0.0158_1e-08_0.005 -0.333876391
## 6  1e-09_0.0158_1e-09_0.0158  0.169018200
## 7    1e-09_0.0158_1e-10_0.05  0.043688199
## 8   1e-09_0.0158_1e-11_0.158 -0.205526939
## 9     1e-10_0.05_1e-08_0.005 -0.034107364
## 10   1e-10_0.05_1e-09_0.0158 -0.166204923
## 11     1e-10_0.05_1e-10_0.05 -0.003520529
## 12    1e-10_0.05_1e-11_0.158 -0.243898057
## 13   1e-11_0.158_1e-08_0.005 -0.067010232
## 14  1e-11_0.158_1e-09_0.0158 -0.255090902
## 15    1e-11_0.158_1e-10_0.05  0.108156482
## 16   1e-11_0.158_1e-11_0.158 -0.034887799

Phenotype differences (v_b)

Table of average Differences (v_b)

##                      Group.1             x
## 1  1e-08_0.0158_1e-08_0.0158 -0.0009979573
## 2    1e-08_0.0158_1e-09_0.05 -0.3831566904
## 3   1e-08_0.0158_1e-10_0.158  0.1964659133
## 4     1e-08_0.0158_1e-11_0.5 -0.5891484283
## 5    1e-09_0.05_1e-08_0.0158 -0.9085769020
## 6      1e-09_0.05_1e-09_0.05  0.0100866952
## 7     1e-09_0.05_1e-10_0.158 -0.0468457273
## 8       1e-09_0.05_1e-11_0.5 -0.2917227943
## 9   1e-10_0.158_1e-08_0.0158 -0.6769856050
## 10    1e-10_0.158_1e-09_0.05 -1.1172741054
## 11   1e-10_0.158_1e-10_0.158  0.1573566841
## 12     1e-10_0.158_1e-11_0.5 -0.2728443554
## 13    1e-11_0.5_1e-08_0.0158 -0.3926328023
## 14      1e-11_0.5_1e-09_0.05 -1.4163172392
## 15     1e-11_0.5_1e-10_0.158 -0.8864611875
## 16       1e-11_0.5_1e-11_0.5 -0.1341703587

Phenotype differences (v_c)

Table of average Differences (v_c)

##                    Group.1          x
## 1    1e-08_0.05_1e-08_0.05 -0.4040913
## 2   1e-08_0.05_1e-09_0.158 -0.5262725
## 3     1e-08_0.05_1e-10_0.5 -0.5856175
## 4    1e-08_0.05_1e-11_1.58 -0.6708966
## 5   1e-09_0.158_1e-08_0.05 -0.4935271
## 6  1e-09_0.158_1e-09_0.158  0.3489808
## 7    1e-09_0.158_1e-10_0.5 -0.5490028
## 8   1e-09_0.158_1e-11_1.58 -0.5515514
## 9     1e-10_0.5_1e-08_0.05 -0.3452146
## 10   1e-10_0.5_1e-09_0.158 -0.5391440
## 11     1e-10_0.5_1e-10_0.5 -0.5478391
## 12    1e-10_0.5_1e-11_1.58 -0.4274895
## 13   1e-11_1.58_1e-08_0.05 -0.2236880
## 14  1e-11_1.58_1e-09_0.158 -0.2568742
## 15    1e-11_1.58_1e-10_0.5 -0.3409935
## 16   1e-11_1.58_1e-11_1.58 -0.3736108

Phenotype differences (v_d)

Table of average Differences (v_d)

##                    Group.1           x
## 1  1e-08_0.158_1e-08_0.158 -0.63330968
## 2    1e-08_0.158_1e-09_0.5 -0.50253898
## 3   1e-08_0.158_1e-10_1.58 -0.85901791
## 4      1e-08_0.158_1e-11_5 -0.09325217
## 5    1e-09_0.5_1e-08_0.158 -0.05162931
## 6      1e-09_0.5_1e-09_0.5 -0.21660078
## 7     1e-09_0.5_1e-10_1.58 -0.21723654
## 8        1e-09_0.5_1e-11_5 -0.87978708
## 9   1e-10_1.58_1e-08_0.158 -0.67831601
## 10    1e-10_1.58_1e-09_0.5 -0.10270499
## 11   1e-10_1.58_1e-10_1.58 -0.04610612
## 12      1e-10_1.58_1e-11_5 -0.64959493
## 13     1e-11_5_1e-08_0.158 -0.14630367
## 14       1e-11_5_1e-09_0.5  0.52834103
## 15      1e-11_5_1e-10_1.58  0.11150282
## 16         1e-11_5_1e-11_5 -0.58431132

Connection between higher phenotype and population

Phenotype differences (v_a)

Phenotype & Populationsize differences (v_a)

Phenotype differences (v_b)

Phenotype & Populationsize differences (v_b)

Phenotype differences (v_c)

Phenotype & Populationsize differences (v_c)

Phenotype differences (v_d)

Phenotype & Populationsize differences (v_d)

Correlation

cor (v_a)

cor (v_b)

cor (v_c)

cor (v_d)

Correlation Histograms Mu A

Plot 1

Plot 2

Plot 3

Plot 4

Plot 5

Plot 6

Plot 7

Plot 8

Plot 9

Plot 10

Correlation Histograms Mu B

Plot 1

Plot 2

Plot 3

Plot 4

Plot 5

Plot 6

Plot 7

Plot 8

Plot 9

Plot 10

Correlation Histograms Mu C

Plot 1

Plot 2

Plot 3

Plot 4

Plot 5

Plot 6

Plot 7

Plot 8

Plot 9

Plot 10

Correlation Histograms Mu D

Plot 1

Plot 2

Plot 3

Plot 4

Plot 5

Plot 6

Plot 7

Plot 8

Plot 9

Plot 10

Correlation across time (v_a)

Random 1 (v_a)

## [1] "pattern 1e-08_0.005_1e-11_0.158_1"
## [1] "Cor between average snake pheno and local cor 0.853760572778879"
## [1] "Cor between average newt pheno and local cor 0.362671403041944"
## [1] "Cor between average dif pheno and local cor 0.879134338226174"
## [1] "Cor between newt pheno and snake 0.625012008488808"

Random 2 (v_a)

## [1] "pattern 1e-08_0.005_1e-10_0.05_2"
## [1] "Cor between average snake pheno and local cor 0.77674759413511"
## [1] "Cor between average newt pheno and local cor 0.814466434187287"
## [1] "Cor between average dif pheno and local cor 0.235960198145116"
## [1] "Cor between newt pheno and snake 0.919844692645017"

Random 3 (v_a)

## [1] "pattern 1e-11_0.158_1e-08_0.005_2"
## [1] "Cor between average snake pheno and local cor 0.376721378075875"
## [1] "Cor between average newt pheno and local cor 0.204801959367532"
## [1] "Cor between average dif pheno and local cor -0.0723515773520942"
## [1] "Cor between newt pheno and snake 0.902384185258089"

Correlation across time (v_b)

Random 1 (v_b)

## [1] "pattern 1e-08_0.0158_1e-08_0.0158_2"
## [1] "Cor between average snake pheno and local cor -0.168012931704619"
## [1] "Cor between average newt pheno and local cor -0.227831237202084"
## [1] "Cor between average dif pheno and local cor 0.321188254748969"
## [1] "Cor between newt pheno and snake 0.976462242096197"

Random 2 (v_b)

## [1] "pattern 1e-09_0.05_1e-10_0.158_0"
## [1] "Cor between average snake pheno and local cor 0.495645123018037"
## [1] "Cor between average newt pheno and local cor 0.683780730975857"
## [1] "Cor between average dif pheno and local cor 0.343077048380392"
## [1] "Cor between newt pheno and snake 0.863610636804903"

Random 3 (v_b)

## [1] "pattern 1e-10_0.158_1e-09_0.05_0"
## [1] "Cor between average snake pheno and local cor -0.136365111793784"
## [1] "Cor between average newt pheno and local cor -0.00417878115632057"
## [1] "Cor between average dif pheno and local cor -0.403757876513809"
## [1] "Cor between newt pheno and snake 0.944867819529124"

Correlation across time (v_c)

Random 1 (v_c)

## [1] "pattern 1e-10_0.5_1e-10_0.5_3"
## [1] "Cor between average snake pheno and local cor -0.18297822109376"
## [1] "Cor between average newt pheno and local cor -0.176414835554545"
## [1] "Cor between average dif pheno and local cor -0.106061513817461"
## [1] "Cor between newt pheno and snake 0.719531691596149"

Random 2 (v_c)

## [1] "pattern 1e-09_0.158_1e-11_1.58_1"
## [1] "Cor between average snake pheno and local cor -0.159994859909367"
## [1] "Cor between average newt pheno and local cor -0.160427813829525"
## [1] "Cor between average dif pheno and local cor -0.00301056525820725"
## [1] "Cor between newt pheno and snake 0.821072242973623"

Random 3 (v_c)

## [1] "pattern 1e-11_1.58_1e-08_0.05_1"
## [1] "Cor between average snake pheno and local cor 0.113070227081819"
## [1] "Cor between average newt pheno and local cor 0.156798285756727"
## [1] "Cor between average dif pheno and local cor -0.100138046198342"
## [1] "Cor between newt pheno and snake 0.847975459477899"

Correlation across time (v_d)

Random 1 (v_d)

## [1] "pattern 1e-11_5_1e-09_0.5_0"
## [1] "Cor between average snake pheno and local cor -0.0155602209793962"
## [1] "Cor between average newt pheno and local cor 0.384223188661971"
## [1] "Cor between average dif pheno and local cor -0.164901108909709"
## [1] "Cor between newt pheno and snake -0.0409191734896981"

Random 2 (v_d)

## [1] "pattern 1e-11_5_1e-08_0.158_2"
## [1] "Cor between average snake pheno and local cor 0.500230439052775"
## [1] "Cor between average newt pheno and local cor 0.36378156098346"
## [1] "Cor between average dif pheno and local cor 0.303737969267246"
## [1] "Cor between newt pheno and snake 0.634194505117167"

Random 3 (v_d)

## [1] "pattern 1e-10_1.58_1e-09_0.5_3"
## [1] "Cor between average snake pheno and local cor 0.0539083740474133"
## [1] "Cor between average newt pheno and local cor 0.282863215735583"
## [1] "Cor between average dif pheno and local cor -0.202438537094216"
## [1] "Cor between newt pheno and snake 0.135596071275061"

What happens over time (looking at the beginning, middle, and late part of my simulations) (v_a)

Pheno Beginning (v_a)

Pheno Middle (v_a)

Pheno End (v_a)

Dif Beginning (v_a)

Dif Middle (v_a)

Dif End (v_a)

What happens over time (looking at the beginning, middle, and late part of my simulations) (v_b)

Pheno Beginning (v_b)

Pheno Middle (v_b)

Pheno End (v_b)

Dif Beginning (v_b)

Dif Middle (v_b)

Dif End (v_b)

What happens over time (looking at the beginning, middle, and late part of my simulations) (v_c)

Pheno Beginning (v_c)

Pheno Middle (v_c)

Pheno End (v_c)

Dif Beginning (v_c)

Dif Middle (v_c)

Dif End (v_c)

What happens over time (looking at the beginning, middle, and late part of my simulations) (v_d)

Pheno Beginning (v_d)

Pheno Middle (v_d)

Pheno End (v_d)

Dif Beginning (v_d)

Dif Middle (v_d)

Dif End (v_d)

Summary (v_a)

Early-Sim Population Size Summary

Mid-Sim Population Size Summary

Late-Sim Population Size Summary

Early Difference Summary

Mid Difference Summary

Late Difference Summary

By Snake GA (Early)

By Snake GA (Mid)

By Snake GA (Late)

By Newt GA (Early)

By Newt GA (Mid)

By Newt GA (Late)

Summary (v_b)

Early-Sim Population Size Summary

Mid-Sim Population Size Summary

Late-Sim Population Size Summary

Early Difference Summary

Mid Difference Summary

Late Difference Summary

By Snake GA (Early)

By Snake GA (Mid)

By Snake GA (Late)

By Newt GA (Early)

By Newt GA (Mid)

By Newt GA (Late)

Summary (v_c)

Early-Sim Population Size Summary

Mid-Sim Population Size Summary

Late-Sim Population Size Summary

Early Difference Summary

Mid Difference Summary

Late Difference Summary

By Snake GA (Early)

By Snake GA (Mid)

By Snake GA (Late)

By Newt GA (Early)

By Newt GA (Mid)

By Newt GA (Late)

Summary (v_d)

Early-Sim Population Size Summary

Mid-Sim Population Size Summary

Late-Sim Population Size Summary

Early Difference Summary

Mid Difference Summary

Late Difference Summary

By Snake GA (Early)

By Snake GA (Mid)

By Snake GA (Late)

By Newt GA (Early)

By Newt GA (Mid)

By Newt GA (Late)

Heatmap (v_a)

Population Size (Early)

Population Size (Mid)

Population Size (Late)

Phenotype (Early)

Phenotype (Mid)

Phenotype (Late)

Heatmap (v_b)

Population Size (Early)

Population Size (Mid)

Population Size (Late)

Phenotype (Early)

Phenotype (Mid)

Phenotype (Late)

Heatmap (v_c)

Population Size (Early)

Population Size (Mid)

Population Size (Late)

Phenotype (Early)

Phenotype (Mid)

Phenotype (Late)

Heatmap (v_d)

Population Size (Early)

Population Size (Mid)

Population Size (Late)

Phenotype (Early)

Phenotype (Mid)

Phenotype (Late)

What is up with the correlations

Early Simulation Correlation (v_a)

Mean

## [1] 0.54326

Max

## [1] 0.5474049

Min

## [1] 0.5392002

popsize

## [1] 0.517508

Early Simulation Correlation (v_b)

Mean

## [1] 0.1655529

Max

## [1] 0.2519408

Min

## [1] 0.095895

popsize

## [1] 0.419727

Early Simulation Correlation (v_c)

Mean

## [1] 0.06514192

Max

## [1] 0.3005453

Min

## [1] 0.3867365

popsize

## [1] 0.4976603

Early Simulation Correlation (v_d)

Mean

## [1] 0.1991463

Max

## [1] 0.08395684

Min

## [1] 0.3101617

popsize

## [1] 0.5130782

Late Simulation Correlation (v_a)

Mean

## [1] -0.0288727

Max

## [1] 0.1288655

Min

## [1] -0.129634

Pop size

## [1] 0.5223597

Late Simulation Correlation (v_b)

Mean

## [1] -0.0843053

Max

## [1] -0.06692039

Min

## [1] 0.1317734

Pop size

## [1] 0.3610041

Late Simulation Correlation (v_c)

Mean

## [1] 0.2723125

Max

## [1] 0.3114732

Min

## [1] 0.3917085

Pop size

## [1] 0.5393433

Late Simulation Correlation (v_d)

Mean

## [1] 0.2032271

Max

## [1] -0.00932744

Min

## [1] 0.1015125

Pop size

## [1] 0.4523698